package com.rockcent.api;

import com.rockcent.model.AddressModel;
import com.rockcent.model.CommentModel;
import com.rockcent.model.CouponBO;
import com.rockcent.model.CustCouponOrderBO;
import com.rockcent.model.CustomerBO;
import com.rockcent.model.CustomerCouponBO;
import com.rockcent.model.CustomerIncomeBO;
import com.rockcent.model.OrderInfo;
import com.rockcent.model.SchoolModel;
import com.rockcent.model.Topics;

import java.util.List;

/**
 * 描述信息
 *
 * @author keegan
 * @date 15/8/6
 */
public interface XYApi {
    String GET_TOPIC_ITEM_DETAIL = "customers/getTopicItemDetail.json";
    String GET_TOPICS = "customers/topics.json";
    String GET_CUSTOMER = "customers/detail.json";
    String GET_SCHOOLS = "customers/schools.json";
    String QUERY_XY_INCOME = "coupon/queryXyIncome.json";
    String LIST_COMMENT = "coupon/listCouponComments.json";
    String LOGIN_BY_APP = "customers/login.json";
    String PUBLISH_COUPON = "coupon/saveCustomerCoupons.json";
    String EDIT_COUPON = "coupon/updateCustomerCoupons.json";
    String BEHAVIOR = "customers/topic/behavior.json";
    String REGISTER_BY_PHONE = "customers/registerByPhone.json";
    String UPDATE_CUSTOMER = "customers/updateCustomer.json";
    String CREATE_CUSTOMER_ORDER = "coupon/createCustomerOrder.json";

    String CREATE_CUSTOMER_ORDER_BY_ALIPAY = "coupon/createCustomerOrderByAliPay.json";
    String CREATE_CUSTOMER_ORDER_BY_WX_PAY = "coupon/createCustomerOrderByWxPay.json";
    String CALC_CUST_COUPON_PRICE = "coupon/calcCustCouponPrice.json";
    String GET_POSITION_BY_SCHOOL = "customers/school/position.json";
    String LIST_CUSTOMER_COUPONS_FOR_PAGE = "coupon/listCustomerCouponsForPage.json";
    String LIST_RECOMMEND_COUPONS = "coupon/listRecommendCoupons.json";
    String VIEW_CUSTOMER_COUPON_BY_ID = "coupon/viewCustomerCouponById.json";
    String LIST_MY_RECEIVED_ORDER = "coupon/listMyReceivedOrder.json";
    String LIST_MY_CUSTOMER_COUPON = "coupon/listMyCustomerCoupon4Page.json";
    String ACTIVATE_COUPON = "coupon/activateCoupon.json";
    String INACTIVATE_COUPON = "coupon/inactivateCoupon.json";
    String SEARCH_COUPON_4_Page = "coupon/searchCoupon4Page.json";
    String MY_FINISHED_ORDER = "coupon/myfinishedOrder.json";
    String MY_UNFINISHED_ORDER = "coupon/myUnfinishedOrder.json";
    String MY_CANCELED_ORDER = "coupon/myCancelledOrder.json";
    String CONFIRM_ORDER = "coupon/confirmOrder.json";
    String CANCEL_ORDER = "coupon/cancelOrder.json";
    String CHANGE_ORDER_PRICE = "coupon/changeOrderPrice.json";

    ApiResponse<Boolean> changeOrderPrice(String xyCustomerId, int orderId, double realPrice);

    /**
     * 取消订单
     *
     * @param orderId
     * @return
     */
    ApiResponse<Boolean> cancelOrder(int orderId, String xyCustomerId);

    /**
     * 确认订单
     *
     * @param orderId
     * @return
     */
    ApiResponse<Boolean> confirmOrder(int orderId);

    /**
     * 【我下的单】已取消的订单
     *
     * @param xyCustomerId
     * @param currentPage
     * @param pageSize
     * @return
     */
    ApiResponse<List<CustCouponOrderBO>> myCanceledOrder(String xyCustomerId, int currentPage, int pageSize);

    /**
     * 【我下的单】未完成的订单
     *
     * @param xyCustomerId
     * @param currentPage
     * @param pageSize
     * @return
     */
    ApiResponse<List<CustCouponOrderBO>> myUnfinishedOrder(String xyCustomerId, int currentPage, int pageSize);

    /** 【我下的单】已完成的订单
     *
     * @param xyCustomerId
     * @param currentPage
     * @param pageSize
     * @return
     */
    ApiResponse<List<CustCouponOrderBO>> myFinishedOrder(String xyCustomerId, int currentPage, int pageSize);

    /**
     *
     * @param xyCustomerId 校友客户uuid
     * @param category     B_B端的券；C_C端的券（空或不传为所有类型）
     * @param searchKey    搜索关键字
     * @param currentPage  分页当前页(最小值为1）
     * @param pageSize     分页大小
     * @return
     */
    ApiResponse<List<CouponBO>> searchCoupon4Page(String xyCustomerId, String category, String searchKey, int currentPage, int pageSize);

    /**
     * 票券下架
     *
     * @param couponModelId
     * @return
     */
    ApiResponse<Boolean> inactivateCoupon(int couponModelId);

    /**
     * 票券上架
     *
     * @param couponModelId
     * @return
     */
    ApiResponse<Boolean> activateCoupon(int couponModelId);

    /**
     * 【我发的券】数据查询
     *
     * @param xyCustomerId
     * @param state
     * @param currentPage
     * @param pageSize
     * @return
     */
    ApiResponse<List<CustomerCouponBO>> listMyCustomerCoupon(String xyCustomerId, String state, int currentPage, int pageSize);

    /**
     * 【我接到的单】列表数据查询
     *
     * @param xyCustomerId 校友客户UUID
     * @param orderState   订单状态（未完成_0,已完成_1,已取消_2）
     * @param currentPage  分页当前页
     * @param pageSize     分页大小
     * @return
     */
    ApiResponse<List<CustCouponOrderBO>> listMyReceivedOrder(String xyCustomerId, int orderState, int currentPage, int pageSize);

    /**
     * 查询票券（C端发的券）
     *
     * @param couponModelId
     * @return
     */
    ApiResponse<CustomerCouponBO> viewCustomerCouponById(int couponModelId);

    /**
     * 【推荐】列表数据查询
     *
     * @param xyCustomerId
     * @return
     */
    ApiResponse<List<CustomerCouponBO>> listRecommendCoupons(String xyCustomerId);

    /**
     * [同学在售]列表数据查询
     *
     * @param xyCustomerId 校友客户uuid
     * @param searchKey    搜索关键字
     * @param currentPage  分页当前页
     * @param pageSize     分页大小
     * @return
     */
    ApiResponse<List<CustomerCouponBO>> listCustomerCouponsForPage(String xyCustomerId, String searchKey, int currentPage, int pageSize);

    ApiResponse<AddressModel> getPositionBySchool(int schoolId);

    /**
     * 计算总价格C端
     *
     * @param custCouponId C端券ID
     * @param count        数量
     * @return
     */
    ApiResponse<Double> calcCustCouponPrice(int custCouponId, int count);

    /**
     * 支付宝支付C端券生成订单
     *
     * @param phone
     * @param couponId
     * @param count
     * @return
     */
    ApiResponse<OrderInfo> createCustomerOrderByAliPay(String phone, int couponId, int count);

    /**
     * 微信支付C端券生成订单
     *
     * @param phone
     * @param couponId
     * @param count
     * @return
     */
    ApiResponse<OrderInfo> createCustomerOrderByWxPay(String phone, int couponId, int count, String appId, String mchId);

    /**
     * 券包中可叠加的优惠券
     *
     * @return
     */
    ApiResponse<String> createCustomerOrder(String phone, int couponId, String payPass, int count);

    /**
     * 更新用户资料
     *
     * @return
     */
    ApiResponse<Boolean> updateCustomer(String obj);

    /**
     * 手机注册 这个是校园神器的接口
     *
     * @param phoneNum
     * @param code
     * @param password
     * @param schoolId
     * @return
     */
    ApiResponse<Void> registerByPhone(String phoneNum, String code, String password, int schoolId);

    ApiResponse<Boolean> behavior(String topicId, String customerId, String behaviorType);

    ApiResponse<Boolean> editCoupon(String obj);

    ApiResponse<Integer> publishCoupon(String obj);

    /**
     * App登录 这个是校园神器的接口
     *
     * @param phoneNum
     * @param password
     * @param loginOS
     * @param imei
     * @param appleToken
     * @return
     */
    ApiResponse<Void> loginByApp(String phoneNum, String password, int loginOS, String imei, String appleToken);

    ApiResponse<List<CommentModel>> listComment(int couponModelId, int currentPage, int pageSize);

    ApiResponse<List<CouponBO>> getTopicItemDetail(String topicId);

    ApiResponse<List<Topics>> getTopics(int currentPage, int pageSize, String type);


    /**
     * 获取客户信息
     *
     * @param loginName
     * @return
     */
    ApiResponse<CustomerBO> getCustomer(String loginName, String xyCustomerId, String customerId);

    /**
     * 获取学校列表
     *
     * @return
     */
    ApiResponse<List<SchoolModel>> getSchools();

    /**
     * 查询用户收入
     *
     * @param customerId
     * @return
     */
    ApiResponse<CustomerIncomeBO> queryXyIncome(String customerId);

}
